<!DOCTYPE html>
<html>
<head>
    <title>消费二维码详情</title>
    <meta name="name" content="content,scale=1.0">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta charset="utf-8"/>

    <style>
        body{
            background: #fff;
        }
        #qrcode{
            text-align: center;
            margin-top: 20px;
        }
        #qrcode img{
            margin: 0 auto;
        }
        .tips{
            font-weight: bold;
            color:red;
            width: 100%;
            text-align: center;
            margin-top: 30px;
        }
        .logo{
            text-align: center;
        }
        .tips2{
            text-align: center;
            color:#282c5b;
            margin-top: 25px;
        }
        .tips2 p{
            line-height: 12px;
        }
    </style>
</head>
<body>
<div id="qrcode">
</div>
<div class="tips">
    20170221178859
</div>

<script src="../script/qrcode.js"></script>
<script src="../script/common.js"></script>
<script src="../script/jquery-1.11.3.js"></script>
<script>
    //获取url中的参数
    var qrId="";
    apiready = function() {
        api.parseTapmode();
        qrId = api.pageParam.qrId;
    }
    function getUrlParam(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
        var r = window.location.search.substr(1).match(reg);  //匹配目标参数
        if (r != null) return unescape(r[2]); return null; //返回参数值
    }
    window.onload =function(){
        var qrcode = new QRCode(document.getElementById("qrcode"), {
            width : 200,//设置宽高
            height : 200
        });
        $(".tips").text(changeNumFormat($(".tips").text(),4))
        var host=window.location.host;
        var url="http://"+host+"/mobile/register.php?tj="+getUrlParam("tj");
        // var url="http://www.gzjinlanren.com/mobile/register.php?tj=18718341993";
        // alert(url)
        qrcode.makeCode(url);
    }
</script>
</body>
</html>

<script>

    // alert(getUrlParam("dd"))
</script>